2020-2021 Sunseeker Telemetry and Lighting System
timer_a_ex5_pwmMultipleUp.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE1   384
 
#define DUTY_CYCLE2   128
 

Functions

void main (void)
 

Macro Definition Documentation

◆ DUTY_CYCLE1

#define DUTY_CYCLE1   384

Definition at line 63 of file timer_a_ex5_pwmMultipleUp.c.

◆ DUTY_CYCLE2

#define DUTY_CYCLE2   128

Definition at line 64 of file timer_a_ex5_pwmMultipleUp.c.

◆ TIMER_PERIOD

#define TIMER_PERIOD   511

This program generates two PWM outputs on P1.2,P1.3 using Timer1_A configured for up mode. The value in CCR0, 512-1, defines the PWM period and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz SMCLK as TACLK, the timer period is ~500us with a 75% duty cycle on P2.2 and 25% on P2.3. ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.045MHz.

Tested On: MSP430FR5749

/ |
RST

| | | P1.2/TA1.1|--> CCR1 - 75% PWM | P1.3/TA1.2|--> CCR2 - 25% PWM

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • Timer peripheral
  • GPIO peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • NONE

Definition at line 62 of file timer_a_ex5_pwmMultipleUp.c.

Function Documentation

◆ main()

void main ( void  )

Definition at line 66 of file timer_a_ex5_pwmMultipleUp.c.

References __no_operation(), DUTY_CYCLE1, DUTY_CYCLE2, param, and TIMER_PERIOD.